#pragma once
enum Result
{Success,Wrong,Empty};
class List
{
protected:
	struct Node
	{
		Node* Pre;
		Node* Nxt;
		void* Data;
		Node(void *Input):Pre(nullptr),Nxt(nullptr),Data(Input){}
	};
	Node* Head;
	Node*_Tail;
	int Size;
public:
	List()
	{
		Size=0;
		Head = new Node(0), _Tail = new Node(0);
		Head->Pre = 0; Head->Nxt = _Tail;
		_Tail->Nxt = 0; _Tail->Pre = Head;
	};
	Node* PushFront(void* Data);
	Node* PushTail(void*Data);
	Result RangFront();
	Result RangTail();
	Result Delete(void* Data);
	Result PopFront();
	Result PopTail();
};

